package com.h117121.fashionshop.core.dao.generic;

import java.io.Serializable;
import java.util.List;

import com.h117121.fashionshop.core.dom.ResultPage;
import com.h117121.fashionshop.core.exception.EntityNotFoundException;

public interface GenericDao<T, Id extends Serializable> {
	List<T> getAll();

	ResultPage getAll(int index, int numItems);

	void saveOrUpdate(T entity);

	void delete(T entity);

	T findById(long id) throws EntityNotFoundException;

	ResultPage getByKeyword(String keyword, int index, int numItems);
}
